<?php defined('ByShopWWI') or exit('Access Invalid!');?>
<script src="<?php echo RESOURCE_SITE_URL;?>/js/index.js"></script>
<script src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.scrolllLoading.js"></script>
<style>
body{background: #f5f5f5 !important;}
.nav{box-shadow: none ;margin-bottom: 0;}
.indexgoodslist{width: 1140px !important;margin: 0 auto ;overflow: auto;height: auto;}
.indexgoodslist .list{
    width: 100%;height: auto;overflow: auto;
}
.indexgoodslist .bigimg{
    width: 1200px;
    height: 360px;
    margin-bottom:30px;

}
.indexgoodslist img{
    border:None;
}

.indexgoodslist .sub{
    margin-right: 26px;
    width: 265px;
    height: 325px;
    float: left;
    position: relative;

}
.indexgoodslist .sub .biger{
    width: 265px;
    height: 265px;
    overflow:hidden;
    position:relative;
    background: #f5f5f5;
}
.indexgoodslist .sub .biger a{
    width: 1000px;
    height: 1000px;
    position: absolute;
    top: -367.5px;
    left: -367.5px;
    z-index: 999;
    text-align: center;
	line-height:995px;
}
.indexgoodslist .sub img{
	display:inline-block;
    width: 265px;
    height: 265px;
}
.indexgoodslist .sub_title{
    margin-top: 15px;
}
.indexgoodslist p{
    position: absolute;
    left: 367.5px;
    top:602.5px;
    width: 265px;
    height: 30px;
    line-height: 30px;
    font-size: 14px;
    color:#fff;
    background: rgba(0,0,0,0.3);
    margin: 0;
    text-align: center;
    display: none;
}
.indexgoodslist .sub .sub_title .name{
    float: left;font-size: 14px;
}
.indexgoodslist .sub .sub_title .name a{
    color:#000;font-size: 14px; font-weight: bold;
}
.indexgoodslist .sub .sub_title .price{
    float: right;font-size: 14px;color:#dab866;
}
.indexgoodslist .title{
    height: 120px !important;
    height: 145px !important;
    display: table-cell !important;
    vertical-align: middle !important;
    text-align: center !important;
    width: inherit !important;
}
.sort{
    background: #f5f5f5;height: auto;overflow: auto;margin: 0 !important;width: 100% !important;
    border-top:1px solid #e7e7e7;
    border-bottom:1px solid #e7e7e7;
}

.sort>a{float: left;font-size: 12px;border-right:1px solid #e7e7e7;height:40px;line-height: 40px;text-align: center;padding:0 20px 0;}
.sort>.func{padding-left:30px;}
.sort>.func:hover{color:#666 !important;}
.sort .hover{background: #fff;}
.sort .hover{padding-right:12px;}
.sort .default{padding-right:20px;}

.inner-banner .col2 img{height: auto !important;}
.subnav{text-align:center;}
.subnav a{
    display: inline-block;
    margin:30px 50px 0;
    padding-top:40px;
    background-repeat: no-repeat;
    background-position: center -60px;
    color:#999999;
}
.subnav .btn_1{background-image:url('/html/images/subnav_1.png')}
.subnav .btn_2{background-image:url('/html/images/subnav_2.png')}
.subnav .btn_3{background-image:url('/html/images/subnav_3.png')}
.subnav .btn_4{background-image:url('/html/images/subnav_4.png')}
.subnav .btn_5{background-image:url('/html/images/subnav_5.png')}
.subnav .btn_6{background-image:url('/html/images/subnav_6.png')}

.subnav a:hover,.subnav .hover{background-position: top center;color:#dab866; }

.biger a img{
	vertical-align: middle;    
    -webkit-transition: -webkit-transform .2s;
    transition: transform .2s;
	zoom: 1;
	display: inline-block;
    vertical-align: middle;
}
.biger a:hover img{
	-webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
    zoom: 1.05;
}
.biger a:hover p{
	display:block;
}

</style>

<div class="row inner-banner">
    <div class="col2">
    <div class="focus" style="height:360px;width:100%;">
        <img src="<?php echo SHOP_TEMPLATES_URL;?>/images/banner-big-2.jpg" alt="">
    </div>
    </div>
</div>

<!--子分类-->
<?php
$subnav = array(
    0=>array("所有商品","index"),
    1=>array("茶具系列","teaSet"),
    2=>array("银品生活","silverLife"),
    3=>array("宗教文化","religCulture"),
    4=>array("家居摆件","home"),
    5=>array("皇家饰品","queen"),
    );

 ?>
<div class="row" style="margin-bottom:60px;">
<div class="col2" id="col2" style="background: #fff;box-shadow: 3px 3px 5px 0px #e3e3e3;" >
<div class="subnav" style="width:100%;height:110px;margin:0;">
<?php foreach ($subnav as $k => $v) {
    if($_GET["op"] == $v[1]){
        echo '<a href="index.php?act=silver&op='.$v[1].'" class="hover btn_'.($k+1).'">'.$v[0].'</a>';
    }else{
        echo '<a href="index.php?act=silver&op='.$v[1].'" class="btn_'.($k+1).'">'.$v[0].'</a>';
    }

 } ?>
</div>


<!--排序-->
<?php
$self_url = "index.php?act=silver&op=index";
$hover1 = "hover";
$hover2 = "";
$hover3 = "";

$price ="";
if(isset($_GET['price'])){

	$hover1 = "";
	$hover2 = "";
	$hover3 = "hover";

	$price=$_GET['price'];
	if($price=="price_height"){
		$price = "price_low";
		$arrow = "2";
	}else{
		$price = "price_height";
		$arrow = "1";
	}

}else{
	$price="price_height";
	$arrow = "2";
}

$time ="";
if(isset($_GET['time'])){

	$hover1 = "";
	$hover2 = "hover";
	$hover3 = "";

	$time=$_GET['time'];
	if($time=="time_up"){
		$time = "time_down";
		$arrow2 = "2";
	}else{
		$time = "time_up";
		$arrow2 = "1";
	}

}else{
	$time="time_up";
	$arrow2 = "2";
}

			?>
<div class="sort">

    <a class="func" href="javascript:void(0)">排序方式：</a>
    <a class="default <?php echo $hover1;?>" href="<?php echo $self_url;?>#col2">默认排序</a>

    <a class="time time_up <?php echo $hover2;?>" href="<?php echo $self_url."&time=".$time;?>#col2">最新上架<?php if(isset($_GET['time'])){?><img src="<?php echo SHOP_TEMPLATES_URL;?>/images/i-btn-arr<?php echo $arrow2;?>.png" alt=""><?php }?></a>

    <a class="price price_up <?php echo $hover3;?>" href="<?php echo $self_url."&price=".$price;?>#col2">价格排序<?php if(isset($_GET['price'])){?><img src="<?php echo SHOP_TEMPLATES_URL;?>/images/i-btn-arr<?php echo $arrow;?>.png" alt=""><?php }?></a>

</div>


<!--列表-->
<div class="indexgoodslist">
<?php
unset($subnav[0]);
//$counter = 0;
foreach ($subnav as $k => $v){
echo '<div class="title"><img src="'.SHOP_TEMPLATES_URL.'/images/jgyq_'.$k.'.jpg" alt="'.$v[0].'"></div>';
echo '<div class="list">';


//$counter = 0;
foreach ($output[$v[1]] as $v2) {
//$counter = $counter + 1;
//if($counter<=8){


$url = urlShop('goods','index',array('goods_id'=> $v2['goods_id']));
$img = thumb($v2, 265);
$str_name = $v2['goods_name'];
$str_des = $v2['goods_jingle']?$v2['goods_jingle']:'金贵银器';
$str_price = $v2['goods_price'];


echo <<<eof
<div class="sub">
    <div class="biger">
        <a href="{$url}" target="_blank">
            <img src="{$img}" alt="{$str_name}" />
            <p>{$str_des}</p>
        </a>
    </div>
    <div class="sub_title">
        <span class="name">
            <a href="" target="_blank">{$str_name}</a>
        </span>
        <span class="price">￥{$str_price}</span>
    </div>
</div>
eof;
//}



}
echo '</div>';
}
?>

</div>
</div>

</div>



<script>
$(function(){

$(".indexgoodslist .list").each(function(){
	
    for (var i = 0; i <= $(this).find(".sub").length; i++){
        if(i%4==0){
            $(this).find(".sub").eq(i-1).css("margin-right","0px")
        }
    }

})

});
</script>
